This snippet was orginally taken from C# Program to Campare Two Dates
using System;
namespace DateAndTime
{
class milestoneProgram
{
static int Main()
{
DateTime d1 = new DateTime(2018, 05, 27);
DateTime d2 = d1.AddDays(-10);
if (d1 < d2){
Console.WriteLine("Starting Date : {0}", d1);
Console.WriteLine("Ending Date : {0}", d2);
}
else {
Console.WriteLine("Starting Date : {0}", d2);
Console.WriteLine("Ending Date : {0}", d1);
};
Console.Read();
return 0;
}
}
}
Here is the output of the C# milestoneProgram:
/*
Starting Date : 05/17/2018 00:00:00
Ending Date : 05/27/2018 00:00:00
*/
Hiya. I'm Ronald, an Industrial Engineer from Colombia. Hope you enjoyed my ad-free, bullshit-free site. If you liked it, tell someone about it.